<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <div th:include="header :: header"></div>
    <title>用户管理</title>
    <script th:src="@{/static/js/modules/sys/sysRole.js}"></script>
</head>
<body class="layui-layout-body">
<div class="layui-layout layui-layout-admin">
    <div th:include="body :: body"></div>
    <div class="layui-body">
        <!-- 内容主体区域 -->
        <div style="padding: 15px;">
            <div class="demoTable">
                <label> 角色名称：</label>
                <div class="layui-inline">
                    <input class="layui-input" id="demoReload" autocomplete="off">
                </div>
                <button class="layui-btn" data-type="reload">搜索</button>
            </div>
            <table class="layui-hide" id="tableData" lay-filter="tableData"></table>
            <script type="text/html" id="toolbarDemo">
                <div class="layui-btn-container">
                    <button class="layui-btn" lay-event="add">
                        <i class="layui-icon">&#xe608;</i> 添加
                    </button>
                </div>
            </script>
            <script type="text/html" id="bar">
                <a class="layui-btn layui-btn-xs" lay-event="edit">编辑</a>
                <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a>
            </script>

        </div>
    </div>

    <div th:include="footer :: footer"></div>
</div>

<div id="formDiv"  style="display:none; margin-top: 10px">
    <!--form表单-->
    <form  class="layui-form" lay-filter="form">
        <input type="text" id="roleId" name="roleId"  style="display:none;">
        <div class="layui-form-item">
            <label class="layui-form-label">角色名称</label>
            <div class="layui-input-inline">
                <input type="text" name="roleName" lay-verify="required" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">备注</label>
            <div class="layui-input-inline">
                <input type="text" name="note" lay-verify="required" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">绑定菜单</label>
        </div>
        <div class="layui-form-item">
            <table class="layui-table layui-form" id="tree-table" lay-size="sm"></table>
        </div>

        <div class="layui-form-item">
            <div class="layui-input-block">
                <button class="layui-btn" lay-submit lay-filter="formButton">立即提交</button>
            </div>
        </div>
    </form>
</div>
<script>
    layui.use(['form'], function(){
        var form = layui.form
        //监听提交
        form.on('submit(formButton)', function(data){
            mentuTreeTable("add",data,null);
            return false;
        });
    });
</script>
</body>


</html>